← Back to All APIs

Users API

Complete user management with authentication endpoints

Base URL
https://fakeapi.in/api/users

API Endpoints

GET/api/users

Get all users

Parameters

page(number)
Page number (default: 1)
limit(number)
Items per page (default: 10)
GET/api/users/1

Get user by ID

Parameters

id(number)
User ID (required)
POST/api/users

Create new user

Parameters

name(string)
User's full name (required)
email(string)
User's email (required)
avatar(string)
Profile picture URL

Request Body

{
  "name": "John Doe",
  "email": "john@example.com",
  "username": "john@123",
  "phone":"9798517945","website",
    "address":"123 Main St, City, Country",
    "company":"Example Corp",
    "jobTitle": "Software Engineer",
    "age": 30,
    "gender": "male",
    "createdAt": "2024-01-15T10:30:00Z",
}
PUT/api/users/1

Update user

Parameters

id(number)
User ID (required)

Request Body

{
   "name": "John Doe",
   "phone":"9798517945","website",
    "address":"123 Main St, City, Country",
    "company":"Example Corp",
    "jobTitle": "Software Engineer",
    "age": 30,
    "gender": "male",
}
DELETE/api/users/1

Delete user

Parameters

id(number)
User ID (required)

Example Usage

// Get all users
fetch('https://fakeapi.in/api/users')
  .then(response => response.json())
  .then(users => console.log(users));

// Create a new user
fetch('https://fakeapi.in/api/users', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    name: 'John Doe',
    email: 'john@example.com'
  })
})
.then(response => response.json())
.then(user => console.log(user));

Example Response

{
"name": "John Doe",
  "email": "john@example.com",
  "username": "john@123",
  "phone":"9798517945","website",
    "address":"123 Main St, City, Country",
    "company":"Example Corp",
    "jobTitle": "Software Engineer",
    "age": 30,
    "gender": "male",
    "createdAt": "2024-01-15T10:30:00Z",
}

Quick Actions

Test in Playground

API Status

StatusOperational
Rate Limit1000 requests/hour
Response FormatJSON
Users API - Complete User Management Documentation | FakeAPI.in